#define  _CRT_SECURE_NO_WARNINGS



#include<stdio.h>
#include<stdlib.h>

int cmp(const void* e1, const void* e2)
{
    return *(int*)e1 - *(int*)e2;
}
int main()
{
    int t = 0;
    scanf("%d", &t);
    while (t--)
    {
        int arr[100] = { 0 }, a[100] = { 0 }, i = 0, n = 0, flag = 1, temp = 0;
        scanf("%d", &n);
        for (i = 0; i < n; i++)
        {
            scanf("%d", &arr[i]);
        }
        qsort(arr, n, sizeof(int), cmp);
        a[0] = arr[0];
        temp = arr[1] - arr[0];
        for (i = 1; i < n; i++)
        {
            a[i] = a[i - 1] + temp;
        }
        for (i = 0; i < n; i++)
        {
            if (arr[i] != a[i])
            {
                flag = 0;
                break;
            }
        }
        if (flag == 1)
            printf("yes\n");
        else
            printf("no\n");
    }

    return 0;
}